package org.maitaole.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.maitaole.entity.SysUser;
import org.maitaole.mapper.SysUserMapper;
import org.maitaole.service.ISysUserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class SysUserServiceImpl implements ISysUserService {

    @Resource
    private SysUserMapper sysUserMapper;

    @Override
    public SysUser findUserByUsername(String username) {
        QueryWrapper<SysUser> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("username", username);
        SysUser sysUser = sysUserMapper.selectOne(queryWrapper);
        return sysUser;
    }
}
